﻿<%@ Page Title="" Language="VB" MasterPageFile="~/KYC/MasterPageKYC.master" AutoEventWireup="false"
    CodeFile="IndividualSearch.aspx.vb" Inherits="KYC_IndividualSearch" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script src="../Scripts/JScript.js" type="text/javascript"></script>
    <script type="text/javascript">


        $(document).ready(function () {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
            $("input[id$=btnAdd]").click(function () {
                window.open('IndividualCDD.aspx?uniqueID=' + $("input[id$=txtNo]").val()
                + '&FirstNameTH=' + $("input[id$=txtFirstNameTH]").val()
                + '&MidNameTH=' + $("input[id$=txtMidNameTH]").val()
                + '&LastNameTH=' + $("input[id$=txtLastNameTH]").val()
                + '&FirstNameEN=' + $("input[id$=txtFirstNameEN]").val()
                + '&MidNameEN=' + $("input[id$=txtMidNameEN]").val()
                + '&LastNameEN=' + $("input[id$=txtLastNameEN]").val()
                + '&PassportNo=' + $("input[id$=txtPASSPORT_NO]").val()
                + '&TypeKYC=1'
                , '_self');
            });

            $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            }));

            $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                yearAddToDisplay: 543,
                dateFormat: 'dd/mm/yy',
                showOn: "button",
                buttonImage: "../img/calendar.gif",
                buttonImageOnly: true
            }));


            function EndRequestHandler(sender, args) {
                $("input[id$=btnAdd]").click(function () {
                    window.open('IndividualCDD.aspx?uniqueID=' + $("input[id$=txtNo]").val()
                + '&FirstNameTH=' + $("input[id$=txtFirstNameTH]").val()
                + '&MidNameTH=' + $("input[id$=txtMidNameTH]").val()
                + '&LastNameTH=' + $("input[id$=txtLastNameTH]").val()
                + '&FirstNameEN=' + $("input[id$=txtFirstNameEN]").val()
                + '&MidNameEN=' + $("input[id$=txtMidNameEN]").val()
                + '&LastNameEN=' + $("input[id$=txtLastNameEN]").val()
                + '&PassportNo=' + $("input[id$=txtPASSPORT_NO]").val()
                + '&TypeKYC=1'
                , '_self');
                });


                $("input[id$=txtStartDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));
                $("input[id$=txtEndDate]").datepicker($.extend({}, $.datepicker.regional['th'], {
                    yearAddToDisplay: 543,
                    dateFormat: 'dd/mm/yy',
                    showOn: "button",
                    buttonImage: "../img/calendar.gif",
                    buttonImageOnly: true
                }));


            }
        });

        var hasSubmitted = 0;
        function NoDoubleSubmit() {
            var divMsg = document.getElementById('Processing');
            if (hasSubmitted == 0) {
                hasSubmitted = 0;
                divMsg.style.display = 'block';

                return true;
            }

            return false;
        }

        var prm = Sys.WebForms.PageRequestManager.getInstance();

        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);

        function InitializeRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'wait';
        }

        function EndRequest(sender, args) {
            $get('ContentPlaceHolder1_UpdatePanel1').style.cursor = 'auto';
        }

        // Created by Ball on Nov 07, 2014 11.00 am
        function setAmlistParam_SEARCH() {
            $("input[id$=hdfCID]").val($("input[id$=txtNo]").val());
            $("input[id$=hdfPassport]").val($("input[id$=txtPASSPORT_NO]").val());
            $("input[id$=hdfNameTH1]").val($("input[id$=txtFirstNameTH]").val());
            $("input[id$=hdfNameTH2]").val($("input[id$=txtMidNameTH]").val());
            $("input[id$=hdfNameTH3]").val($("input[id$=txtLastNameTH]").val());
            $("input[id$=hdfNameEN1]").val($("input[id$=txtFirstNameEN]").val());
            $("input[id$=hdfNameEN2]").val($("input[id$=txtMidNameEN]").val());
            $("input[id$=hdfNameEN3]").val($("input[id$=txtLastNameEN]").val());
            return true;
        }

        // Created by Ball on Nov 07, 2014 11.00 am
        function popAMListWindow() {
            var strUniquedId = $("input[id$=hdfCID]").val();
            var strPassportId = $("input[id$=hdfPassport]").val();
            var strNameTh1 = $("input[id$=hdfNameTH1]").val().replace("&", "|");
            var strNameTh2 = $("input[id$=hdfNameTH2]").val().replace("&", "|");
            var strNameTh3 = $("input[id$=hdfNameTH3]").val().replace("&", "|");
            var strNameEn1 = $("input[id$=hdfNameEN1]").val().replace("&", "|");
            var strNameEn2 = $("input[id$=hdfNameEN2]").val().replace("&", "|");
            var strNameEn3 = $("input[id$=hdfNameEN3]").val().replace("&", "|");

            var allString = $("input[id$=hdfCID]").val() +
                            $("input[id$=hdfPassport]").val() +
                            $("input[id$=hdfNameTH1]").val() +
                            $("input[id$=hdfNameTH2]").val() +
                            $("input[id$=hdfNameTH3]").val() +
                            $("input[id$=hdfNameEN1]").val() +
                            $("input[id$=hdfNameEN2]").val() +
                            $("input[id$=hdfNameEN3]").val()

            var isValid = true;
            if (allString.toString() == ""){
                isValid = false;
            }

            var returnvalue = null;

            if (isValid) {
                returnvalue = window.showModalDialog('AMLList.aspx?uniqueID=' + strUniquedId
                + '&passportID=' + strPassportId
                + '&NameTh1=' + strNameTh1
                + '&NameTh2=' + strNameTh2
                + '&NameTh3=' + strNameTh3
                + '&NameEn1=' + strNameEn1
                + '&NameEn2=' + strNameEn2
                + '&NameEn3=' + strNameEn3

                , null, 'status:no; dialogWidth:1000px; dialogHeight:600px; help:no; scroll:yes; menubar:no; resizable:no');
            }
            else {
                alert("กรุณาป้อน -เลขที่บัตรประชาชน/หนังสือเดินหรือชื่อ นามสกุล- สำหรับการตรวจกรองรายชื่อ");
            }

            if (returnvalue != null) {
                var values = returnvalue.split(";");  // return กลับมาหลายค่าแบ่งด้วย ";"
                document.getElementById("<%=hdfLevel.ClientID%>").value = values[0];
            }
        }

        function OpenReasonPopup(url) {
            var returnvalue = window.showModalDialog(url, null, 'status:no; dialogWidth:800px; dialogHeight:600px; help:no; scroll:yes; menubar:no; resizable:no');
        }

        var returnvalue;
        function OpenAccountPopup(url) {
            //var returnvalue = window.showModalDialog(url, null, 'status:no; dialogWidth:800px; dialogHeight:600px; help:no; scroll:yes; menubar:no; resizable:no');
            returnvalue = window.open(url, 'AccountPopup', 'scrollbars=yes,menubar=no,width=1000, resizable=yes,toolbar=no,location=no,status=no');

            returnvalue.focus();
            document.onmousedown = focusPopup;
            document.onmousemove = focusPopup;
        }

        function focusPopup() {
            if (returnvalue && !returnvalue.closed) { returnvalue.focus(); }
        }

        window.onbeforeunload = function () {
            if (returnvalue && !returnvalue.closed) { returnvalue.close(); }
        }

    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            
            
            <asp:HiddenField ID="hdfNameTH1" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameTH2" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameTH3" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN1" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN2" runat="server" Value="" />
            <asp:HiddenField ID="hdfNameEN3" runat="server" Value="" />
            <asp:HiddenField ID="hdfCID" runat="server" Value="" />
            <asp:HiddenField ID="hdfPassport" runat="server" Value="" />
            <asp:HiddenField ID="hdfLevel" runat="server" Value="" />
            

            <table style="width: 100%;">
                <tr>
                    <td colspan="8" style="text-align: left">
                        <asp:CheckBox ID="chkType" runat="server" Checked="True" CssClass="control" Enabled="False"
                            Font-Bold="True" ForeColor="#FF850E" />
                        &nbsp;
                        <asp:CheckBox ID="chkUser" runat="server" CssClass="control" 
                            Text="ข้อมูลที่ปรับปรุงโดยผู้ใช้งาน" AutoPostBack="True" />
                        &nbsp;ตั้งแต่วันที่
                        <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
                        &nbsp;ถึง
                        <asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox>
                        &nbsp;<asp:Label ID="lblBranch" runat="server" Visible="False">ส่วนงาน/สาขา</asp:Label>
                        &nbsp;<asp:DropDownList ID="ddlBranch" runat="server" CssClass="control" Visible="False"
                            Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right; width: 16%;">
                        <g id="4ac45b0ff4a047c6bf377372fdfac7ca0" p:def="Evolus.Common:PlainTextV2" 
                            p:type="Shape" transform="matrix(1,0,0,1,296,152)" 
                            xmlns="http://www.w3.org/2000/svg" 
                            xmlns:p="http://www.evolus.vn/Namespace/Pencil">
                            <p:metadata><p:property name="disabled"><![CDATA[false]]></p:property>
                        <p:property name="width"><![CDATA[100,0]]></p:property>
                        <p:property name="fixedWidth"><![CDATA[false]]></p:property>
                        <p:property name="label"><![CDATA[เลขประจำตัวลูกค้า (CIF)]]></p:property>
                        <p:property name="textColor"><![CDATA[#000000FF]]></p:property>
                        <p:property name="textFont"><![CDATA[Microsoft Sans Serif|normal|normal|12px|none]]></p:property>
                        <p:property name="textAlign"><![CDATA[0,0]]></p:property></p:metadata>
                            <rect x="0" y="0" style="fill: none; stroke: none; visibility: hidden; display: none;" 
                            p:name="bgRect" id="e1e0b68ddb9b4f6bbb97340c9bdba7df0" width="0" 
                            height="0"/>
                            เลขประจำตัวลูกค้า
                            <br />
                            </g>
                        <strong style="font-size: 10px">CIF Number</strong></td>
                    <td colspan="2" style="text-align: left; width: 160px;">
                        <asp:TextBox ID="txtCIF_NO" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" Width="160px"></asp:TextBox>
                        </td>
                    <td align="right">
                        <asp:TextBox ID="txtCustCode" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="20" Visible="False" Width="160px"></asp:TextBox>
                    </td>
                    <td style="text-align: left; width: 95px;">
                        <asp:Label ID="lblevIDPass" runat="server"></asp:Label>
                        <asp:Label ID="lblevIDPass0" runat="server"></asp:Label>
                    </td>
                    <td colspan="3" style="text-align: left">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 16%; text-align: right;">
                        เลขที่บัตรประจำตัวประชาชน<br /> <strong style="font-size: 10px">Thai National ID 
                        Card Number</strong></td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtNo" runat="server" AutoCompleteType="Disabled" CssClass="control"
                            Height="20px" MaxLength="13" Width="160px" onkeypress="javascript:return NumberOnly(event);"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;" colspan="2">
                        เลขที่หนังสือเดินทาง<br /><strong style="font-size: 10px">Passport Number</strong></td>
                    <td style="text-align: left" colspan="2">
                        <asp:TextBox ID="txtPASSPORT_NO" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="20" Width="160px"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;">
                        เลขที่เอกสารสำคัญประจำตัวบุคคลอื่นๆ<br /> <strong style="font-size: 10px">Other 
                        Identity Documents Number</strong></td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtOTH_DOC_CARDID" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="20" Width="160px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16%; text-align: right;">
                        ชื่อ<br /></td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtFirstNameTH" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="100" Width="160px"></asp:TextBox>
                    </td>
                    <td colspan="2" style="width: 16%; text-align: right;">
                        ชื่อกลาง<br /></td>
                    <td colspan="2" style="text-align: left">
                        <asp:TextBox ID="txtMidNameTH" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="100" Width="160px"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;">
                        นามสกุล<br /></td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtLastNameTH" runat="server" AutoCompleteType="Disabled" 
                            CssClass="control" Height="20px" MaxLength="100" Width="160px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16%; text-align: right;">
                        Name</td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtFirstNameEN" runat="server" CssClass="control" MaxLength="100"
                            Width="160px" Height="20px" AutoCompleteType="Disabled" onkeypress="javascript:return EngOnly(event);"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;" colspan="2">
                        <asp:Label ID="lblMidNameEN" runat="server">Middle Name</asp:Label>
                    </td>
                    <td style="text-align: left" colspan="2">
                        <asp:TextBox ID="txtMidNameEN" runat="server" CssClass="control" Width="160px" Height="20px"
                            MaxLength="100" AutoCompleteType="Disabled" onkeypress="javascript:return EngOnly(event);"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;">
                        <asp:Label ID="lblLastNameEN" runat="server">Last Name</asp:Label>
                    </td>
                    <td style="text-align: left">
                        <asp:TextBox ID="txtLastNameEN" runat="server" CssClass="control" Width="160px" Height="20px"
                            MaxLength="100" AutoCompleteType="Disabled" onkeypress="javascript:return EngOnly(event);"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 16%; text-align: right;">
                        &nbsp;</td>
                    <td style="text-align: left">
                        <asp:TextBox ID="lblSerch_Result" runat="server" AutoCompleteType="Disabled" 
                            BackColor="White" CssClass="control" Height="20px" 
                            MaxLength="100" Width="160px" BorderStyle="None" ForeColor="Red"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;" colspan="2" align="left">
                        &nbsp;</td>
                    <td colspan="2">
                        &nbsp;
                        <asp:TextBox ID="lblRISK_LEVEL" runat="server" AutoCompleteType="Disabled" 
                            BackColor="White" BorderStyle="None" CssClass="control" ForeColor="Red" 
                            Height="20px" MaxLength="100" Width="120px"></asp:TextBox>
                    </td>
                    <td style="width: 16%; text-align: right;">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="8" style="text-align: right;">
                        <asp:Button ID="btnSearchSancList" runat="server" Text="ตรวจกรองรายชื่อ" 
                            Width="135px" />
                        <asp:Button ID="btnShowAccount" runat="server" Text="แสดงข้อมูลบัญชี" 
                            Width="135px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="8" style="text-align: right;">
                        <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="ค้นหา (1)" 
                            Width="135px" />
                        <asp:Button ID="btnKYC" runat="server" CssClass="control" 
                            Text="พิมพ์ฟอร์ม KYC (2)" Width="135px" />
                        <asp:Button ID="btnPrintD" runat="server" CssClass="control" 
                            Text="พิมพ์ฟอร์มเงินฝาก (2)" Visible="False" Width="135px" />
                        <asp:Button ID="btnPrintL" runat="server" CssClass="control" 
                            Text="พิมพ์ฟอร์มสินเชื่อ (2)" Visible="False" Width="135px" />
                        <asp:Button ID="btnPrintP" runat="server" CssClass="control" 
                            Text="พิมพ์ฟอร์มตั๋วฯ (2)" Visible="False" Width="135px" />
                        <asp:Button ID="btnAdd" runat="server" CssClass="control" Enabled="False" 
                            Text="เพิ่ม KYC (3)" Width="135px" />
                        <asp:Button ID="btnAddOld" runat="server" CssClass="control" 
                            Text="ประเมินความเสี่ยง (3)" Visible="False" Width="135px" />
                        <asp:Button ID="btnEdit" runat="server" CssClass="control" 
                            Text="ข้อมูล KYC (4)" Visible="False" Width="135px" />
                        <asp:Button ID="btnShow" runat="server" CssClass="control" 
                            Text="ข้อมูล KYC (3)" Visible="False" Width="135px" />
                        <asp:Button ID="btnCancel" runat="server" CssClass="control" Text="เคลียร์" 
                            Width="135px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="8" style="text-align: center">
                        <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text="ไม่พบข้อมูล" Font-Bold="True"
                            Font-Size="30px" Height="30px" Visible="False"></asp:Label>
                        <%--<asp:Panel ID="PleaseWaitMessagePanel" runat="server" CssClass="modalPopup" Height="50px" 
                        Width="125px" Visible="False" style="DISPLAY: none">
    Please wait<br />
    <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
 </asp:Panel>--%>
                        <span id="Processing" style="display: none">
                            <img src="../img/icon/ajax-loader.gif" alt="Please wait" />
                            กรุณารอสักครู่ ระบบกำลังค้นหาข้อมูล... </span>
                        <asp:GridView ID="grdIndividual" runat="server" CellPadding="4" ForeColor="#333333"
                            AutoGenerateColumns="False" Width="100%" AllowPaging="True" OnRowCommand="grdIndividual_RowCommand">
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <Columns>
                                <asp:BoundField DataField="CUSTSEQ" HeaderText="รหัส"
                                HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" ></asp:BoundField>
                                
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/img/icon/select_icon.gif"
                                    ShowSelectButton="True">
                                    <ItemStyle Width="60px" HorizontalAlign="Center" />
                                </asp:CommandField>
                                
                                  <asp:TemplateField HeaderText="">
                                                <ItemTemplate>
                                                 <asp:Button ID="btDetail" runat="server" 
                                                 Text="ข้อสังเกตุ" Width="65" 
                                                 CommandName="Acc_Import" 
                                                 CommandArgument="<%#Ctype(Container,GridViewRow).RowIndex%>" />                                                 
                                                </ItemTemplate>
                                                <HeaderStyle HorizontalAlign="Center" />
                                                <ItemStyle HorizontalAlign="Center" Width="80px" />
                                   </asp:TemplateField>

                                <asp:TemplateField HeaderText="CIF NO. CBS/FDR/NPA">
                                    <ItemTemplate>
                                        <%--<asp:Label ID="lblCustCode" runat="server" Text='<%# iif(Eval("TRANTYPE")=2,"BO",iif(Eval("TRANTYPE")=3,"ผู้จัดการกองทุน",iif(Eval("TRANTYPE")=4,"ผู้ถือหุ้น",(Eval("CUSTCODE"))))) %>'></asp:Label>--%>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("CIF_CBS_NO") & " / " & Eval("CIF_FDR_NO") & " / " & Eval("CIF_NPA_NO") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="10%" />
                                </asp:TemplateField>                                                

                                    <asp:TemplateField HeaderText="Citizen ID/ Passport / Other ID">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblUniqueID" runat="server" Text='<%# Eval("UNIQUEID") %>'></asp:Label><br />
                                        <asp:Label ID="lblPassport_No" runat="server" Text='<%# Eval("PASSPORT_NO") %>'></asp:Label><br />
                                        <asp:Label ID="lblOthD_No" runat="server" Text='<%# Eval("OTH_DOC_CARDID") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="18%" />
                                </asp:TemplateField>

                              
                                <asp:TemplateField HeaderText="Customer Name">
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblTHName" runat="server" Text='<%# Eval("THFIRSTNAME") & "  " & Eval("THMIDNAME") & "  " & Eval("THLASTNAME") %>'></asp:Label><br />
                                        <asp:Label ID="lblENName_1" runat="server" Text='<%# Eval("ENFIRSTNAME") & "  " & Eval("ENMIDNAME") & "  " & Eval("ENLASTNAME") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="18%" />
                                </asp:TemplateField>

                                <asp:TemplateField HeaderText="ชื่อลูกค้า (อังกฤษ)" 
                                     HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" >
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblENName" runat="server" Text='<%# Eval("ENFIRSTNAME") & "  " & Eval("ENMIDNAME") & "  " & Eval("ENLASTNAME") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Left" Width="18%" />
                                </asp:TemplateField>
                              
                                <asp:TemplateField HeaderText="Risk Level / Syn Status / KYC Inf Status">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRiskLevel" runat="server" Text='<%# Eval("AMLCDD") %>'></asp:Label>
                                        <asp:Label ID="Label2" runat="server" Text=" / "></asp:Label>
                                        <asp:Label ID="lblEtlStatus" runat="server" Text='<%# Eval("ETL_STATUS") %>'></asp:Label>
                                        <asp:Label ID="Label3" runat="server" Text=" / "></asp:Label>
                                        <asp:Label ID="lblCustCompleteFlag" runat="server" Text='<%# Eval("CUST_COMPLETE_FLAG") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>

                                <asp:BoundField DataField="AMLCDD" HeaderText="ระดับ"
                                HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden"  />
                                <asp:TemplateField HeaderText="ระดับ / สถานะ"
                                HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" >
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# eval("AMLCDD") & " / " & eval("ETL_STATUS") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="D W S" DataField="DEPD">
                                    <HeaderStyle HorizontalAlign="Center" Width="5px" />
                                    <ItemStyle Width="5px" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="L O S" DataField="DEPL">
                                    <HeaderStyle HorizontalAlign="Center" Width="5px" />
                                    <ItemStyle Width="5px" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="F D R" DataField="DEPP">
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="5px" />
                                    <ItemStyle Width="5px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DEPN" HeaderText="N P A">
                                    <HeaderStyle Width="5px" />
                                    <ItemStyle Width="5px" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Last Update">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUpdateDate" runat="server" Text='<%# Eval("UPDATEDATE") %>'></asp:Label>
                                        <asp:Label ID="lblDepUpdate" runat="server" Text='<%# "(" & Eval("DEPUPDATE") & ")" %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Update By">
                                    <ItemTemplate>
                                        <asp:Label ID="lblUpdateBy" runat="server" Text='<%# Eval("UpdateBy") %>'></asp:Label>
                                        &nbsp;/
                                        <asp:Label ID="lblBranchCode" runat="server" Text='<%# Eval("BranchCode") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="CUSTOMER_OWNER" HeaderText="Customer Owner" />
                                <asp:BoundField DataField="NEXT_REVIEW" HeaderText="Next Review" DataFormatString="{0:d}" />
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <div align="right">
                <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
